3.5.46 \(\int \cot ^3(e+f x) (a+b \sec ^2(e+f x))^p \, dx\) [446]

3.5.46.1 Optimal result
3.5.46.2 Mathematica [A] (verified)
3.5.46.3 Rubi [A] (verified)
3.5.46.4 Maple [F]
3.5.46.5 Fricas [F]
3.5.46.6 Sympy [F(-1)]
3.5.46.7 Maxima [F]
3.5.46.8 Giac [F]
3.5.46.9 Mupad [F(-1)]

3.5.46.1 Optimal result

Integrand size = 23, antiderivative size = 157 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=-\frac {\cot ^2(e+f x) \left (a+b \sec ^2(e+f x)\right )^{1+p}}{2 (a+b) f}+\frac {(a+b-b p) \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,\frac {a+b \sec ^2(e+f x)}{a+b}\right ) \left (a+b \sec ^2(e+f x)\right )^{1+p}}{2 (a+b)^2 f (1+p)}-\frac {\operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b \sec ^2(e+f x)}{a}\right ) \left (a+b \sec ^2(e+f x)\right )^{1+p}}{2 a f (1+p)} \]

output
-1/2*cot(f*x+e)^2*(a+b*sec(f*x+e)^2)^(p+1)/(a+b)/f+1/2*(-b*p+a+b)*hypergeo 
m([1, p+1],[2+p],(a+b*sec(f*x+e)^2)/(a+b))*(a+b*sec(f*x+e)^2)^(p+1)/(a+b)^ 
2/f/(p+1)-1/2*hypergeom([1, p+1],[2+p],1+b*sec(f*x+e)^2/a)*(a+b*sec(f*x+e) 
^2)^(p+1)/a/f/(p+1)
 
3.5.46.2 Mathematica [A] (verified)

Time = 3.96 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.89 \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=-\frac {\left (b+(a+b) \cot ^2(e+f x)\right ) \left (a (a+b) (1+p) \cot ^2(e+f x)+(a+b)^2 \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,\frac {a+b+b \tan ^2(e+f x)}{a}\right )-a (a+b-b p) \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \left (a+b \sec ^2(e+f x)\right )^p \tan ^2(e+f x)}{2 a (a+b)^2 f (1+p)} \]

input
Integrate[Cot[e + f*x]^3*(a + b*Sec[e + f*x]^2)^p,x]
 
output
-1/2*((b + (a + b)*Cot[e + f*x]^2)*(a*(a + b)*(1 + p)*Cot[e + f*x]^2 + (a 
+ b)^2*Hypergeometric2F1[1, 1 + p, 2 + p, (a + b + b*Tan[e + f*x]^2)/a] - 
a*(a + b - b*p)*Hypergeometric2F1[1, 1 + p, 2 + p, 1 + (b*Tan[e + f*x]^2)/ 
(a + b)])*(a + b*Sec[e + f*x]^2)^p*Tan[e + f*x]^2)/(a*(a + b)^2*f*(1 + p))
 
3.5.46.3 Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.04, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 4627, 354, 114, 25, 174, 75, 78}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a+b \sec (e+f x)^2\right )^p}{\tan (e+f x)^3}dx\)

\(\Big \downarrow \) 4627

\(\displaystyle \frac {\int \frac {\cos (e+f x) \left (b \sec ^2(e+f x)+a\right )^p}{\left (1-\sec ^2(e+f x)\right )^2}d\sec (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\cos (e+f x) \left (b \sec ^2(e+f x)+a\right )^p}{\left (1-\sec ^2(e+f x)\right )^2}d\sec ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 114

\(\displaystyle \frac {\frac {\left (a+b \sec ^2(e+f x)\right )^{p+1}}{(a+b) \left (1-\sec ^2(e+f x)\right )}-\frac {\int -\frac {\cos (e+f x) \left (b \sec ^2(e+f x)+a\right )^p \left (-b p \sec ^2(e+f x)+a+b\right )}{1-\sec ^2(e+f x)}d\sec ^2(e+f x)}{a+b}}{2 f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\int \frac {\cos (e+f x) \left (b \sec ^2(e+f x)+a\right )^p \left (-b p \sec ^2(e+f x)+a+b\right )}{1-\sec ^2(e+f x)}d\sec ^2(e+f x)}{a+b}+\frac {\left (a+b \sec ^2(e+f x)\right )^{p+1}}{(a+b) \left (1-\sec ^2(e+f x)\right )}}{2 f}\)

\(\Big \downarrow \) 174

\(\displaystyle \frac {\frac {(a-b p+b) \int \frac {\left (b \sec ^2(e+f x)+a\right )^p}{1-\sec ^2(e+f x)}d\sec ^2(e+f x)+(a+b) \int \cos (e+f x) \left (b \sec ^2(e+f x)+a\right )^pd\sec ^2(e+f x)}{a+b}+\frac {\left (a+b \sec ^2(e+f x)\right )^{p+1}}{(a+b) \left (1-\sec ^2(e+f x)\right )}}{2 f}\)

\(\Big \downarrow \) 75

\(\displaystyle \frac {\frac {(a-b p+b) \int \frac {\left (b \sec ^2(e+f x)+a\right )^p}{1-\sec ^2(e+f x)}d\sec ^2(e+f x)-\frac {(a+b) \left (a+b \sec ^2(e+f x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sec ^2(e+f x)}{a}+1\right )}{a (p+1)}}{a+b}+\frac {\left (a+b \sec ^2(e+f x)\right )^{p+1}}{(a+b) \left (1-\sec ^2(e+f x)\right )}}{2 f}\)

\(\Big \downarrow \) 78

\(\displaystyle \frac {\frac {\frac {(a-b p+b) \left (a+b \sec ^2(e+f x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sec ^2(e+f x)+a}{a+b}\right )}{(p+1) (a+b)}-\frac {(a+b) \left (a+b \sec ^2(e+f x)\right )^{p+1} \operatorname {Hypergeometric2F1}\left (1,p+1,p+2,\frac {b \sec ^2(e+f x)}{a}+1\right )}{a (p+1)}}{a+b}+\frac {\left (a+b \sec ^2(e+f x)\right )^{p+1}}{(a+b) \left (1-\sec ^2(e+f x)\right )}}{2 f}\)

input
Int[Cot[e + f*x]^3*(a + b*Sec[e + f*x]^2)^p,x]
 
output
((a + b*Sec[e + f*x]^2)^(1 + p)/((a + b)*(1 - Sec[e + f*x]^2)) + (((a + b 
- b*p)*Hypergeometric2F1[1, 1 + p, 2 + p, (a + b*Sec[e + f*x]^2)/(a + b)]* 
(a + b*Sec[e + f*x]^2)^(1 + p))/((a + b)*(1 + p)) - ((a + b)*Hypergeometri 
c2F1[1, 1 + p, 2 + p, 1 + (b*Sec[e + f*x]^2)/a]*(a + b*Sec[e + f*x]^2)^(1 
+ p))/(a*(1 + p)))/(a + b))/(2*f)
 

3.5.46.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 75
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x 
)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + 
 d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (IntegerQ[m] 
 || GtQ[-d/(b*c), 0])
 

rule 78
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b 
*c - a*d)^n*((a + b*x)^(m + 1)/(b^(n + 1)*(m + 1)))*Hypergeometric2F1[-n, m 
 + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m}, x] 
 &&  !IntegerQ[m] && IntegerQ[n]
 

rule 114
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[b*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1 
)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e 
 - a*f))   Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) 
 - b*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], 
 x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && ILtQ[m, -1] && (IntegerQ[n] || 
 IntegersQ[2*n, 2*p] || ILtQ[m + n + p + 3, 0])
 

rule 174
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* 
((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d)   Int[(e + f*x)^ 
p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d)   Int[(e + f*x)^p/(c + d 
*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4627
Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*tan[(e_.) + ( 
f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Sec[e + f*x], x]}, Si 
mp[1/f   Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a + b*(c*ff*x)^n)^p/x), x] 
, x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[( 
m - 1)/2] && (GtQ[m, 0] || EqQ[n, 2] || EqQ[n, 4] || IGtQ[p, 0] || Integers 
Q[2*n, p])
 
3.5.46.4 Maple [F]

\[\int \cot \left (f x +e \right )^{3} \left (a +b \sec \left (f x +e \right )^{2}\right )^{p}d x\]

input
int(cot(f*x+e)^3*(a+b*sec(f*x+e)^2)^p,x)
 
output
int(cot(f*x+e)^3*(a+b*sec(f*x+e)^2)^p,x)
 
3.5.46.5 Fricas [F]

\[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cot \left (f x + e\right )^{3} \,d x } \]

input
integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")
 
output
integral((b*sec(f*x + e)^2 + a)^p*cot(f*x + e)^3, x)
 
3.5.46.6 Sympy [F(-1)]

Timed out. \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\text {Timed out} \]

input
integrate(cot(f*x+e)**3*(a+b*sec(f*x+e)**2)**p,x)
 
output
Timed out
 
3.5.46.7 Maxima [F]

\[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cot \left (f x + e\right )^{3} \,d x } \]

input
integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")
 
output
integrate((b*sec(f*x + e)^2 + a)^p*cot(f*x + e)^3, x)
 
3.5.46.8 Giac [F]

\[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \cot \left (f x + e\right )^{3} \,d x } \]

input
integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")
 
output
integrate((b*sec(f*x + e)^2 + a)^p*cot(f*x + e)^3, x)
 
3.5.46.9 Mupad [F(-1)]

Timed out. \[ \int \cot ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx=\int {\mathrm {cot}\left (e+f\,x\right )}^3\,{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^p \,d x \]

input
int(cot(e + f*x)^3*(a + b/cos(e + f*x)^2)^p,x)
 
output
int(cot(e + f*x)^3*(a + b/cos(e + f*x)^2)^p, x)